package cn.itsource.api;

import cn.itsource.admin.dto.RuleDto;
import cn.itsource.factory.RuleFeignClientFactory;
import cn.itsource.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "it-fccar-service-rule",fallbackFactory = RuleFeignClientFactory.class)
public interface RuleFeignClient {
    /**
     * 里程数 求总金额
     * @param mileage
     * @return
     */
    @GetMapping("/manager/rule/{mileage}")
    JSONResult valuation(@PathVariable("mileage")String mileage);

    /**
     * 获取基础账单数据
     * @param hours
     * @return
     */
    @GetMapping("/manager/rule/base/{hours}")
    JSONResult getRuleDto(@PathVariable("hours") int hours);

    @GetMapping("/manager/rule/driverTotalProportion")
    JSONResult getDriverTotalProportion();

}
